var login_user = null
var mask = null
var stu_id = null
$(function() { // 初始化内容
	mask = mui.createMask(); //遮罩层
	datetime_init();

	login_user = JSON.parse(localStorage.getItem('loginUser'));
	console.log(login_user)


	stu_id = JSON.parse(sessionStorage.getItem('stu_id'));
	console.log(stu_id)

	setTimeout(function() {

		loadFollowUpList();
	}, 500)



});

function createFollowUp() {

	window.sessionStorage.setItem("stu_id", stu_id);
	window.location.href = "followUp_form.html"
}


function loadFollowUpList() {
	var data = {}
	data['id'] = stu_id;

	jQuery.ajax({
		type: "post",
		headers: {
			'Authorization': login_user.token
		},
		url: serverip + "fxgw/loadgj",
		contentType: 'application/json;charset=UTF-8',
		data: JSON.stringify(data),
		dataType: "json",
		timeout: 10000,
		beforeSend: function() {

			mask.show(); //显示遮罩层	
		},
		success: function(res) {

			mask.close(); //显示遮罩层  	

			console.log("获取数据======" + JSON.stringify(res));
			app.list = res.gjList
		},

		error: function(e) {

			console.log("错误信息====" + JSON.stringify(e));
			mask.close(); //显示遮罩层
			var msg = e.responseJSON.message;
			var code = e.responseJSON.status;
			mui.alert('错误编码' + code + "\n" + "错误信息:" + msg);
			
		}
	});
}


var app = new Vue({
	el: '#app',
	data: {
		show: true,
		list: []
	},
	methods: {

	}
});
